{% extends "../../base.html"%} {% block header_title %}后台管理首页{% end %}
{% block static_css %}
<link rel="stylesheet" href="{{ static_url('assets/css/animate.css') }}">
{% end %} {% block body %}

<div class="row">
    <div class="col-xs-1 col-sm-1 col-md-1 sidebar">
        <div class="user">
            <img src="{{static_url('images/ico-user-header.svg')}}">
            <h5>{{current_user['username']}}</h5>
            <a href="/auth/signout"><span class="glyphicon glyphicon-cog"title="用户中心"></span></a>&nbsp;
            <a href="/auth/signout">
                <span class="glyphicon glyphicon-off" aria-hidden="true"></span>
            </a>
        </div>
        <ul class="nav nav-sidebar">
            <li title="首页">
                <a href="/admin">
                    <i class="fa fa-home"></i>
                    <span class="hidden-sm hidden-xs text">首页</span>
                </a>
            </li>
            <li title="数据集" class="active">
                <a href="/admin/data">
                    <i class="fa fa-clipboard"></i>
                    <span class="hidden-sm hidden-xs text">数据集</span>
                </a>
            </li>
            <li title="申请单">
                <a href="/admin/apply">
                    <i class="fa fa-archive"></i>
                    <span class="hidden-sm hidden-xs text">申请单</span>
                </a>
            </li>
            <li title="应用表">
                <a href="/admin/app">
                    <i class="fa fa-cube"></i>
                    <span class="hidden-sm hidden-xs text">应用表</span>
                </a>
            </li>
        </ul>
    </div>
    <div class="col-xs-11 col-xs-offset-1 col-sm-11 col-sm-offset-1 col-md-11 col-md-offset-1 main">
        <div class="page-header">
            <h1>新增数据集</h1><small>请在这里添加数据<br>1，添加数据集简要说明<br>2，添加数据集元数据</small>
        </div>
        <section>
            <div class="box">
                <a href="/admin/data" class="btn btn-default">
                    <i class="fa fa-ban"></i> 返回</a>&nbsp;
            </div>
            <div class="box">
                <div class="box-title">
                    <h5>数据集添加</h5>
                </div>
                <div class="box-body">
                    <form class="form-horizontal" method="post" action="/data/form">
                        <div class="form-group">
                            <label class="col-md-2 control-label"><span class="text-danger">*</span>名称</label>
                            <div class="col-md-6">
                                <input type="text" class="form-control" name="datasetTitle">
                            </div>
                            <p class="col-md-4 help-block">数据集名不能为空</p>
                        </div>
                        <div class="form-group">
                            <label class="col-md-2 control-label"><span class="text-danger">*</span>类型</label>
                            <div class="col-md-6">
                                <input type="text" class="form-control" name="datasetType">
                            </div>
                            <p class="col-md-4 help-block">请填写类似image,txt,data之类的定义</p>
                        </div>
                        <div class="form-group">
                            <label class="col-md-2 control-label"><span class="text-danger">*</span>数据位置</label>
                            <div class="col-md-6">
                                <input type="text" class="form-control" name="datasetType">
                                <p class="help-block">请填写数据在主机磁盘上的位置</p>
                            </div>
                            <p class="col-md-4 help-block">请填写类似image,txt,data之类的定义</p>
                        </div>
                        <div class="form-group">
                            <label class="col-md-2 control-label">概要说明</label>
                            <div class="col-md-6">
                                <textarea class="form-control form-textarea" name="datasetNote" id="editor" rows="10"></textarea>
                            </div>
                            <p class="col-md-4 help-block">请详细说明数据集</p>
                        </div>
                        <hr>
                        <div class="form-group">
                            <div class="col-md-offset-2 col-md-6">
                                <button type="submit" class="btn btn-success btn-block">添加</button>
                                {% raw xsrf_form_html() %}
                            </div>
                        </div>
                    </form>
                </div>
            </div>
        </section>
    </div>
</div>

{% end %} {% block static_js %}
<script src="{{ static_url('data/js/form.js') }}"></script>
{% end %}
